<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery.min.js"></script>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .father {
            width: 200px;
            height: 200px;
            background-color: greenyellow;
            margin: 200px 0 0 200px;
        }

        .son {
            width: 100px;
            height: 100px;
            background-color: hotpink;
            margin-left: 50px;
        }
    </style>
</head>

<body>
    <div class="father">
        <div class="son"></div>
    </div>
    <script>
        console.log($(".son").offset().top);
        $(".son").offset({
            left:300
        });
    </script>
</body>

</html>